import React from "react";
const Home=React.lazy(()=>import('../views/home'))
const Car=React.lazy(()=>import('../views/car'))
const List=React.lazy(()=>import('../views/list'))
const My=React.lazy(()=>import('../views/my'))
const MainLayout=React.lazy(()=>import('../views/mainLayout'))

const Detail=React.lazy(()=>import('../views/detail'))

export const ROUTER_LIST_CHILDREN=[
    {
        path:'/',
        element:<Home/>,
        title:'首页'
    },
    {
        path:'/list',
        element:<List/>,
        title:'列表'
    },
    {
        path:'/car',
        element:<Car/>,
        title:'购物车'
    },
    {
        path:'/my',
        element:<My/>,
        title:'我的'
    }
]
export const ROUTER_LIST=[
    {
        path:'/',
        element:<MainLayout/>,
        children:ROUTER_LIST_CHILDREN
    },
    {
        path:'/detail/:id',
        element:<Detail/>
    }
]